﻿namespace Sail
{
    /// <summary>
    /// 对象映射接口
    /// </summary>
    /// <typeparam name="TSource">源对象</typeparam>
    /// <typeparam name="TTarget">目标对象</typeparam>
    public interface IMapper<in TSource, out TTarget> : IDependency
    {
        /// <summary>
        /// 对象映射
        /// </summary>
        /// <param name="source">源对象</param>
        /// <returns>映射后的目标对象</returns>
        TTarget Map(TSource source);
    }
}
